home *** CD-ROM | disk | FTP | other *** search
- Path: etek.chalmers.se!chalmers.se!sunic!uunet!ogicse!emory!gatech!concert!sas!mozart.unx.sas.com!walker
- From: walker@twix.unx.sas.com (Doug Walker)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Auto opening libraries by SAS/C
- Message-ID: <C2nEHC.537@unx.sas.com>
- Date: 18 Feb 93 14:20:00 GMT
- References: <729977726.F00003@monly.wlink.nl>
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Organization: SAS Institute Inc.
- Lines: 50
- Originator: walker@twix.unx.sas.com
- Nntp-Posting-Host: twix.unx.sas.com
-
-
- In article <729977726.F00003@monly.wlink.nl>, Bart.Schraa@f115.n100.z60.wlink.nl (Bart Schraa) writes:
- |> What I tried is this:
- |>
- |> #include <stdio.h>
- |> #include <proto/intuition.h>
- |>
- |> long __oslibversion = 38L;
- |>
- |> void main(void)
- |> {
- |> printf("!\n");
- |> }
- |>
- |> As my version of the OS is 37, I assume it shouldn't print anything, or at least not a '!'. What am I doing wrong???
- |>
-
- You didn't use IntuitionBase, so it didn't get linked in, so it
- didn't get initialized. Declaring it is not the same as using it.
-
- You can use it either by calling any Intuition function (the normal
- way) or by referring to it in code.
-
- Try the code below. Note that DisplayBeep is an Intuition function.
-
- #include <stdio.h>
- #include <proto/intuition.h>
-
- long __oslibversion = 38L;
-
- void main(void)
- {
- DisplayBeep(NULL);
- }
-
- What I get is a line to stdout saying
-
- Can't open version 38 of "intuition.library"
-
- and the DisplayBeep never happens. Change __oslibversion to 37,
- and the DisplayBeep will happen (your screen will flash).
-
- --
- *****
- =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
- *|. o.| || 1200/2400/9600 Dual
- | o |// For all you do, this bug's for you!
- ======
- usenet: walker@unx.sas.com bix: djwalker
- Any opinions expressed are mine, not those of SAS Institute, Inc.